import request from '@/config/axios/index'


// 获取文件预签名地址
export const getFilePresignedUrl = (path: string) => {
  return request.get<any>({
    url: '/infra/file/presigned-url',
    params: { path }
  })
}

// 创建文件
export const createFile = (data: any) => {
  return request.post({ url: '/infra/file/create', data })
}

// 上传文件
export const updateFile = (data: any) => {
  return request.upload({ url: '/infra/file/upload', data })
}
